#pragma once

#include "T_Action.h"

class ActionInterval:public T_Action{
protected:
	float m_Duration;
	float m_TimeElapsed;
	ActionInterval():m_Duration(0),m_TimeElapsed(0){}
public:
	static ActionInterval *create(float dur,ActionCallback c);
	void setDuration(float secs);
	virtual bool init(T_Node *node);
	virtual void startWithTarget(T_Node *node);
	virtual bool isDone()const;
	virtual void update(int dt);
	virtual ActionType getActionType(){return DelayAction;}
};